package com.rex.saas.enums;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * OtaTypeEnum
 *
 * @author zhusiyu
 **/
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum OtaTypeEnum {

    /**
     *
     */
    GW_OTA(1, "网关ota"),
    SUB_OTA(2, "网关子设备ota"),
    DEVICE_OTA(3, "设备ota"),
    ;
    /**
     *
     */
    private int code;
    /**
     * 信息
     */
    private String message;

    public static Map<Integer, String> getList() {
        Map<Integer, String> map = new HashMap<>();
        for (OtaTypeEnum deviceOptTypeEnum : values()) {
            map.put(deviceOptTypeEnum.getCode(), deviceOptTypeEnum.getMessage());
        }
        return map;
    }
}
